home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-24 | 4.7 KB | 175 lines | [TEXT/MPS ] |
- ;
- ; File: OSAGeneric.a
- ;
- ; Contains: AppleScript Generic Component Interfaces.
- ;
- ; Version: Technology: AppleScript 1.1
- ; Package: Universal Interfaces 2.2 in “MPW” on ETO #20
- ;
- ; Copyright: © 1984-1995 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- ; stack. Include the file and version information (from above)
- ; in the problem description and send to:
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__OSAGENERIC__') = 'UNDEFINED' THEN
- __OSAGENERIC__ SET 1
-
-
- IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
- include 'Errors.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
- include 'AppleEvents.a'
- ENDIF
- ; include 'Types.a' ;
- ; include 'Memory.a' ;
- ; include 'MixedMode.a' ;
- ; include 'OSUtils.a' ;
- ; include 'Events.a' ;
- ; include 'Quickdraw.a' ;
- ; include 'QuickdrawText.a' ;
- ; include 'EPPC.a' ;
- ; include 'AppleTalk.a' ;
- ; include 'Files.a' ;
- ; include 'Finder.a' ;
- ; include 'PPCToolbox.a' ;
- ; include 'Processes.a' ;
- ; include 'Notification.a' ;
-
- IF &TYPE('__OSA__') = 'UNDEFINED' THEN
- include 'OSA.a'
- ENDIF
- ; include 'AEObjects.a' ;
- ; include 'Components.a' ;
- ; NOTE: This interface defines a "generic scripting component."
- ; The Generic Scripting Component allows automatic dispatch to a
- ; specific scripting component that conforms to the OSA interface.
- ; This component supports OSA, by calling AppleScript or some other
- ; scripting component. Additionally it provides access to the default
- ; and the user-prefered scripting component.
- ;
-
- ; Component version this header file describes
- kGenericComponentVersion EQU $0100
-
- kGSSSelectGetDefaultScriptingComponent EQU $1001
- kGSSSelectSetDefaultScriptingComponent EQU $1002
- kGSSSelectGetScriptingComponent EQU $1003
- kGSSSelectGetScriptingComponentFromStored EQU $1004
- kGSSSelectGenericToRealID EQU $1005
- kGSSSelectRealToGenericID EQU $1006
- kGSSSelectOutOfRange EQU $1007
-
- ; typedef OSType ScriptingComponentSelector
- ; typedef OSAID GenericID
- ; get and set the default scripting component
- ;
- ; pascal OSAError OSAGetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector *scriptingSubType)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _OSAGetDefaultScriptingComponent
- dc.w $2F3C
- dc.w $0004
- dc.w $1001
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION OSAGetDefaultScriptingComponent
- ENDIF
-
- ;
- ; pascal OSAError OSASetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _OSASetDefaultScriptingComponent
- dc.w $2F3C
- dc.w $0004
- dc.w $1002
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION OSASetDefaultScriptingComponent
- ENDIF
-
- ; get a scripting component instance from its subtype code
- ;
- ; pascal OSAError OSAGetScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType, ComponentInstance *scriptingInstance)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _OSAGetScriptingComponent
- dc.w $2F3C
- dc.w $0008
- dc.w $1003
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION OSAGetScriptingComponent
- ENDIF
-
- ; get a scripting component selector (subType) from a stored script
- ;
- ; pascal OSAError OSAGetScriptingComponentFromStored(ComponentInstance genericScriptingComponent, const AEDesc *scriptData, ScriptingComponentSelector *scriptingSubType)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _OSAGetScriptingComponentFromStored
- dc.w $2F3C
- dc.w $0008
- dc.w $1004
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION OSAGetScriptingComponentFromStored
- ENDIF
-
- ; get a real component instance and script id from a generic id
- ;
- ; pascal OSAError OSAGenericToRealID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance *theExactComponent)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _OSAGenericToRealID
- dc.w $2F3C
- dc.w $0008
- dc.w $1005
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION OSAGenericToRealID
- ENDIF
-
- ; get a generic id from a real component instance and script id
- ;
- ; pascal OSAError OSARealToGenericID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance theExactComponent)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _OSARealToGenericID
- dc.w $2F3C
- dc.w $0008
- dc.w $1006
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION OSARealToGenericID
- ENDIF
-
- ENDIF ; __OSAGENERIC__
-